package com.tensquare.search.dao;

import com.tensquare.search.pojo.Article;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @author Macross
 * @Type ArticleSearchDao.java
 * @Desc 文章搜索dao接口
 * @date 2019/12/19 15:22
 */
public interface ArticleSearchDao extends ElasticsearchRepository<Article,String> {

    /**
     * 通过关键字搜索文章
     * @param title 文章标题
     * @param content 文章内容
     * @param pageable 分页对象
     * @return
     */
    Page<Article> findByTitleOrContentLike(String title, String content, Pageable pageable);
}
